﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GreatB2C.Config.Shop
{
    public class TemplateConfig
    {
        #region 商店模板配置
        /// <summary>
        /// 确认订单时站内短信/Email通知内容
        /// </summary>
        public static string EmailOfOrderConfirm
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "EmailOfOrderConfirm" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "EmailOfOrderConfirm" , value );
            }
        }

        /// <summary>
        /// 收到银行汇款后站内短信/Email通知内容
        /// </summary>
        public static string EmailOfReceiptMoney
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "EmailOfReceiptMoney" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "EmailOfReceiptMoney" , value );
            }
        }

        /// <summary>
        /// 退款后站内短信/Email通知内容
        /// </summary>
        public static string EmailOfRefund
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "EmailOfRefund" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "EmailOfRefund" , value );
            }
        }

        /// <summary>
        /// 开发票后站内短信/Email通知内容
        /// </summary>
        public static string EmailOfInvoice
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "EmailOfInvoice" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "EmailOfInvoice" , value );
            }
        }

        /// <summary>
        /// 发出货物后站内短信/Email通知内容
        /// </summary>
        public static string EmailOfDeliver
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "EmailOfDeliver" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "EmailOfDeliver" , value );
            }
        }

        /// <summary>
        /// 发送卡号后站内短信/Email通知内容
        /// </summary>
        public static string EmailOfSendCard
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "EmailOfSendCard" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "EmailOfSendCard" , value );
            }
        }

        /// <summary>
        /// 发送单张优惠劵的站内短信/Email通知内容
        /// </summary>
        public static string EmailOfCouponMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "EmailOfCouponMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "EmailOfCouponMessage" , value );
            }
        }

        /// <summary>
        /// 发送多张优惠劵的站内短信/Email通知内容
        /// </summary>
        public static string EmailOfCouponInfosMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "EmailOfCouponInfosMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "EmailOfCouponInfosMessage" , value );
            }
        }

        /// <summary>
        /// 订单打印模板管理
        /// </summary>
        public static string OrderPrintFormat
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "OrderPrintFormat" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "OrderPrintFormat" , value );
            }
        }

        /// <summary>
        /// 发货单打印模板管理
        /// </summary>
        public static string ConsignmentFormat
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "ConsignmentFormat" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "ConsignmentFormat" , value );
            }
        }

        /// <summary>
        /// 积分订单打印模板管理
        /// </summary>
        public static string CreditOrderPrintFormat
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "CreditOrderPrintFormat" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "CreditOrderPrintFormat" , value );
            }
        }

        /// <summary>
        /// 积分发货单打印模板管理
        /// </summary>
        public static string CreditConsignmentFormat
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "CreditConsignmentFormat" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "CreditConsignmentFormat" , value );
            }
        }

        /// <summary>
        /// 发送缺货登记补货邮件通知模板管理
        /// </summary>
        public static string OutOfStockLog
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "OutOfStockLog" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "OutOfStockLog" , value );
            }
        }

        /// <summary>
        /// 补货单打印模板管理
        /// </summary>
        public static string FillProduct
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Template , "FillProduct" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Template , "FillProduct" , value );
            }
        }

        public static bool Config( string EmailOfOrderConfirm , string EmailOfReceiptMoney , string EmailOfRefund , string EmailOfInvoice
            , string EmailOfDeliver , string EmailOfSendCard , string EmailOfCouponMessage , string EmailOfCouponInfosMessage
            , string OrderPrintFormat , string ConsignmentFormat , string CreditOrderPrintFormat , string CreditConsignmentFormat 
            , string OutOfStockLog , string FillProduct )
        {
            Dictionary<string , string> dicts = new Dictionary<string , string>( );

            dicts.Add( "EmailOfOrderConfirm" , EmailOfOrderConfirm );
            dicts.Add( "EmailOfReceiptMoney" , EmailOfReceiptMoney );
            dicts.Add( "EmailOfRefund" , EmailOfRefund );
            dicts.Add( "EmailOfInvoice" , EmailOfInvoice );
            dicts.Add( "EmailOfDeliver" , EmailOfDeliver );
            dicts.Add( "EmailOfSendCard" , EmailOfSendCard );
            dicts.Add( "EmailOfCouponMessage" , EmailOfCouponMessage );
            dicts.Add( "EmailOfCouponInfosMessage" , EmailOfCouponInfosMessage );
            dicts.Add( "OrderPrintFormat" , OrderPrintFormat );
            dicts.Add( "ConsignmentFormat" , ConsignmentFormat );
            dicts.Add( "CreditOrderPrintFormat" , CreditOrderPrintFormat );
            dicts.Add( "CreditConsignmentFormat" , CreditConsignmentFormat );
            dicts.Add( "OutOfStockLog" , OutOfStockLog );
            dicts.Add( "FillProduct" , FillProduct );

            return BaseConfig.SetConfigForBatch( BaseConfig.eConfigs.Template , dicts );
        }
        #endregion
    }
}
